/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bio.tests;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.faces.bean.SessionScoped;
import org.primefaces.model.DualListModel;

/**
 *
 * @author Diego
 */
@SessionScoped
public class ParserFilter implements  Serializable{

    private Set<String> keywords = new HashSet<String>();
    private Set<String> subkeywords = new HashSet<String>();
    private Set<String> featurekeywords = new HashSet<String>();
    private Set<String> qualifierskeywords = new HashSet<String>();
    private Set<String> allkeys = new HashSet<String>();
    private Set<String> mandatory = new HashSet<String>();
    private Set<String> mandatorykey = new HashSet<String>();
    private Set<String> mandatorysubkey = new HashSet<String>();
    private Set<String> mandatoryfeaturekeys = new HashSet<String>();
    private String original_file = "";
    private List<String> source_kw = new ArrayList<String>();
    private List<String> source_skw = new ArrayList<String>();
    private List<String> source_fkw = new ArrayList<String>();
    private List<String> source_qkw = new ArrayList<String>();
    private List<String> target_kw = new ArrayList<String>();
    private List<String> target_skw = new ArrayList<String>();
    private List<String> target_fkw = new ArrayList<String>();
    private List<String> target_qkw = new ArrayList<String>();
    private DualListModel<String> dual_kw = new DualListModel<String>(source_kw, target_kw);
    private DualListModel<String> dual_skw = new DualListModel<String>(source_skw, target_skw);
    private DualListModel<String> dual_fkw = new DualListModel<String>(source_fkw, target_fkw);
    private DualListModel<String> dual_qkw = new DualListModel<String>(source_qkw, target_qkw);

    public DualListModel<String> getDual_fkw() {
        return dual_fkw;
    }

    public void setDual_fkw(DualListModel<String> dual_fkw) {
        this.dual_fkw = dual_fkw;
    }

    public DualListModel<String> getDual_kw() {
        return dual_kw;
    }

    public void setDual_kw(DualListModel<String> dual_kw) {
        this.dual_kw = dual_kw;
    }

    public DualListModel<String> getDual_qkw() {
        return dual_qkw;
    }

    public void setDual_qkw(DualListModel<String> dual_qkw) {
        this.dual_qkw = dual_qkw;
    }

    public DualListModel<String> getDual_skw() {
        return dual_skw;
    }

    public void setDual_skw(DualListModel<String> dual_skw) {
        this.dual_skw = dual_skw;
    }

    public List<String> getSource_fkw() {
        return source_fkw;
    }

    public void setSource_fkw(List<String> source_fkw) {
        this.source_fkw = source_fkw;
    }

    public List<String> getSource_kw() {
        return source_kw;
    }

    public void setSource_kw(List<String> source_kw) {
        this.source_kw = source_kw;
    }

    public List<String> getSource_qkw() {
        return source_qkw;
    }

    public void setSource_qkw(List<String> source_qkw) {
        this.source_qkw = source_qkw;
    }

    public List<String> getSource_skw() {
        return source_skw;
    }

    public void setSource_skw(List<String> source_skw) {
        this.source_skw = source_skw;
    }

    public List<String> getTarget_fkw() {
        return target_fkw;
    }

    public void setTarget_fkw(List<String> target_fkw) {
        this.target_fkw = target_fkw;
    }

    public List<String> getTarget_kw() {
        return target_kw;
    }

    public void setTarget_kw(List<String> target_kw) {
        this.target_kw = target_kw;
    }

    public List<String> getTarget_qkw() {
        return target_qkw;
    }

    public void setTarget_qkw(List<String> target_qkw) {
        this.target_qkw = target_qkw;
    }

    public List<String> getTarget_skw() {
        return target_skw;
    }

    public void setTarget_skw(List<String> target_skw) {
        this.target_skw = target_skw;
    }

    public Set<String> getMandatoryfeaturekeys() {
        return mandatoryfeaturekeys;
    }

    public void setMandatoryfeaturekeys(Set<String> mandatoryfeaturekeys) {
        this.mandatoryfeaturekeys = mandatoryfeaturekeys;
    }

    public Set<String> getMandatorysubkey() {
        return mandatorysubkey;
    }

    public void setMandatorysubkey(Set<String> mandatorysubkey) {
        this.mandatorysubkey = mandatorysubkey;
    }

    public String getOriginal_file() {
        return original_file;
    }

    public void setOriginal_file(String original_file) {
        this.original_file = original_file;
    }

    public Set<String> getMandatory() {
        return mandatory;
    }

    public void setMandatory(Set<String> mandatory) {
        this.mandatory = mandatory;
    }

    public Set<String> getMandatorykey() {
        return mandatorykey;
    }

    public void setMandatorykey(Set<String> mandatorykey) {
        this.mandatorykey = mandatorykey;
    }

    public ParserFilter() {
        mandatorykey.add("LOCUS");
        mandatorykey.add("DEFINITION");
        mandatorykey.add("ACCESSION");
        mandatorykey.add("VERSION");
        mandatorykey.add("KEYWORDS");
        mandatorykey.add("SOURCE");
        mandatorykey.add("REFERENCE");
        mandatorykey.add("FEATURES");
        mandatorysubkey.add("JOURNAL");
        mandatorykey.add("ORIGIN");
        mandatorykey.add("//");
        mandatorysubkey.add("ORGANISM");
        mandatoryfeaturekeys.add("source");

    }

    public Set<String> getAllkeys() {
        return allkeys;
    }

    public void configure() {
        mandatory.clear();
        allkeys.clear();
        mandatory.addAll(mandatorykey);
        mandatory.addAll(mandatorysubkey);
        mandatory.addAll(mandatoryfeaturekeys);
        allkeys.addAll(mandatory);
    }

    public void setAllkeys(Set<String> allkeys) {
        this.allkeys = allkeys;
    }

    public Set<String> getFeaturekeywords() {
        return featurekeywords;
    }

    public void setFeaturekeywords(Set<String> featurekeywords) {
        this.featurekeywords = featurekeywords;
    }

    public Set<String> getKeywords() {
        return keywords;
    }

    public void setKeywords(Set<String> keywords) {
        this.keywords = keywords;
    }

    public Set<String> getQualifierskeywords() {
        return qualifierskeywords;
    }

    public void setQualifierskeywords(Set<String> qualifierskeywords) {
        this.qualifierskeywords = qualifierskeywords;
    }

    public Set<String> getSubkeywords() {
        return subkeywords;
    }

    public void setSubkeywords(Set<String> subkeywords) {
        this.subkeywords = subkeywords;
    }
}
